import Cookies from "js-cookie";

const TOKEN = 'h5_sso_sessionid'
const USERID = "h5_userId"
const APPLICATION = 'h5_application'
const USERNAME = "h5_username"

export function getH5Token() {
  return Cookies.get(TOKEN)
}

export function setH5Token(token) {
  console.log("TOKEN",TOKEN)
  return Cookies.set(TOKEN, token)
}




export function setH5Username(username) {
  return Cookies.set(USERNAME, username)
}


export function removeH5Token() {
  return Cookies.remove(TOKEN)
}

//
export function getH5Application() {
  return Cookies.get(APPLICATION)
}

export function getH5Username() {
  return Cookies.set(USERNAME)
}

export function setH5Application(application = 'icims-admin') {
  return Cookies.set(APPLICATION, application)
}

export function removeH5Application() {
  return Cookies.remove(APPLICATION)
}

//
export function getH5UserId() {
  console.log("USERID",USERID)
  return Cookies.get(USERID)
}

export function setH5UserId(userId) {
  console.log("USERID",USERID)
  return Cookies.set(USERID, userId)
}

export function removeH5UserId() {
  return Cookies.remove(USERID)
}




